﻿--[[
   @brief    helper_mgr user for  start, stop, switch for helper.
   @author   harleyxwang
   @version  1.0
   @date     2016-03-03
--]]

helper_mgr_desc =
{
    module_name = 'helper_mgr',
    events = 
    {
        {
            c_event = 
            {
                {
                    id = ierd_tgp.tgp_plugin.PLUGINMGR_ON_PLUGIN_ON_READY,
                    callback = "helper_mgr_control.switch_to_helper_page"
                },
                {
                    id = ierd_tgp.tgp_plugin.PLUGINMGR_ON_PLUGIN_ON_TERMINATE,
                    callback = "helper_mgr_control.notify_page_plugin_terminate"
                },
                {
                    id = ierd_tgp.tgp_plugin.PLUGINMGR_ON_PLUGIN_ON_LAUNCH_FAIL,
                    callback = "helper_mgr_control.notify_page_plugin_launch_fail"
                },
            },
            lua_event = 
            {
                {
                    id  = banner_event.FOCUS_BANNER_ITEM,
                    callback = "helper_mgr_control.handle_banner_switch"
                },
                {
                    id  = banner_event.UPDATE_PLUGIN_STATE,
                    callback = "helper_mgr_control.update_plugin_state"
                },
                {
                    id  = mainframe_event.CHANGE_MAINFRAME_MODE,
                    callback = "helper_mgr_control.on_mainframe_mode_change"
                },
                {
                    id  = banner_event.UPDATE_BANNER_CONFIG,
                    callback = "helper_mgr_control.on_update_banner_config"
                },
            },
            lua_file = "helper_mgr\\control.lua"
        }
    }
};
desc_mgr.add(helper_mgr_desc);